var gulp = require('gulp'),
    browserSync = require("browser-sync").create(); //浏览器实时刷新

    // 监听文件变化
gulp.task('watch', function() {
      gulp.watch('src/**/*.*').on('change', browserSync.reload);
  });
  
//启动热更新
gulp.task('serve',['watch'], function() {

    browserSync.init({
        port: 3000,
        server: {
            baseDir: ['src']
        }
    });

});

gulp.task('default', ['serve']);